Product Catalogue
WA Catalogue Management APIs:
UAT base domain: https://apiuat.aclwhatsapp.com/access-api/v1/wa/
Production base domain: https://api.aclwhatsapp.com/access-api/v1/wa/
Fetch Products API:
It will be used to fetch the Products available in any particular Product Set.
API endpoint- /{product-set-id OR catalogue-id}/products?limit=<Integer>&after=<string>&before=<string>&pretty=0&fields=<string,string,...>&summary=<boolean>
Request Type- POST
Sample Curl Request-
Curl Request-
curl --location '{domain}/{product-set-id OR catalogue-id}/products?limit=<Integer>&after=<string>&before=<string>&pretty=0&fields=<string,string,...>&summary=<boolean>' --header 'Authorization: Bearer {token}' --header 'Content-Type: application/json' --data ''
Query Parameter Description-
-
limit - Integer value (default: 25) — Specifies the maximum number of records to return in the response. Set this to a specific integer, such as 3, to limit the results.
-
pretty - 0 or 1 — A flag indicating whether the output should be formatted in a human-readable way. Use 1 for pretty-formatted output and 0 for raw output.
-
after - String — Use this parameter to specify a value after which records should be returned. Typically, this would be an URL endpoint to paginate results.
-
before - Similar to after, this parameter allows you to define the value before which the records should be returned.
-
fields - name, retailer_id (string) — Defines the specific fields to return in the result. In this case, it limits the output to only the name and retailer_id fields.
-
summary - false (boolean) — A flag to specify whether a summary should be included in the response. Setting this to false would mean no summary is included.
Sample Response-
{
"data": [
{
"id": "8601622153242493",
"name": "Croma Neckband",
"retailer_id": "305"
},
{
"id": "5858677717583494",
"name": "Ambrane Dots Play TWS Earbuds with Passive Noise Cancellation",
"retailer_id": "306"
},
{
"id": "5800420790035632",
"name": "Truke Air Buds Lite E1 TWS Earbuds with AI Noise Cancellation",
"retailer_id": "303"
},
{
"id": "5741175252627964",
"name": "Croma CREEH2006sBTEB TWS Earbuds with Noise Isolation",
"retailer_id": "302"
},
{
"id": "5691661610950641",
"name": "Croma CREEH1901sBTEB TWS Earbuds",
"retailer_id": "300"
},
{
"id": "5687612624621008",
"name": "realme Buds Q2 Neo RMA2010 TWS Earbuds with Noise Cancellation",
"retailer_id": "304"
},
{
"id": "5634590290002219",
"name": "boAt Airdopes 441 TWS Earbuds",
"retailer_id": "301"
}
]
}
Update Products API:
It will be used to update the Products available in any Product Set.
API endpoint- /{catalogue-id}/items_batch
Request Type- POST
Sample Curl Request-
Curl Request-
curl --location '{domain}/<Catalog_ID>/items_batch' --header 'Authorization: Bearer <Keycloak Acces Token>' --header 'Content-Type: application/json' --data '{"item_type": "PRODUCT_ITEM","requests": [{"method": "CREATE","data": {"id": "retailer-2","availability": "in stock","brand": "Nike","google_product_category": "t-shirts","description": "product description","image_link": "http://www.images.example.com/t-shirts/1.png","title": "product name","price": "10.00 USD","condition": "new","link": "http://www.images.example.com/t-shirts/1.png","item_group_id": "product-group-1","inventory": "2"}}]}'
Sample Response-
{
"handles": [
"Acxle2NaBSLpuxodqPREfWRLE9wrrAO0x0Fmj_laTSzRRUvnB1czLTChPTSpge4KYmylamC0OTXROM8-irvD12w_"
]
}
Check Product Batch Request:
It will be used to Products Updates status.
API endpoint- /%catalog-id%/check_batch_request_status?handle=%handle%
Request Type- GET
Sample Curl Request-
Curl Request-
curl --location '{domain}/<Catalog_ID>/check_batch_request_status?handle=<Batch ID>'
--header 'Authorization: Bearer <keycloak access token>'
Sample Response-
{
"data": [
{
"handle": "Acyto76B2GZqqgh5AnSYuoX4nv36L2zw3XArAIC9ZsxpMqnYSEM-o-RcX5KpGG3OHSsxX0vo0JYRvgB0eHTGoOlf",
"status": "finished",
"errors_total_count": 0,
"errors": [],
"warnings": [],
"ids_of_invalid_requests": [],
"warnings_total_count": 0
}
]
}
Create Catalogue:
To create catalog.
API endpoint- /create_catalog
Request Type- POST
Sample Curl Request-
Curl Request-
curl --location '{base domain}/create_catalog'\
--header 'Authorization: {token} \
--header 'Content-Type: application/json' \
--data '{
"customer_business_id": "{bisiness_id}",
"name": "product name"
}'
Create Product Set-
To create product set on Commerce Platform.
API endpoint- /%catalog-id%/items_batch
Request Type- POST
Sample Curl Request-
Curl Request-
curl --location '{domain}/{catalog-id}/items_batch' \
--header 'Content-Type: application/json' \
--header 'Authorization: {token}
--data '{
"item_type": "PRODUCT_ITEM",
"requests": [
{
"method": "CREATE",
"data": {
"id": "4",
"price":"10.00 USD",
"availability": "in stock",
"brand": "Nike",
"condition": "new",
"link": "http://www.images.example.com/t-shirts/1.png",
"item_group_id": "product-group-1",
"inventory": "2",
"description": "product description",
"image_link": "https://onlinetestcase.com/wp-content/uploads/2023/06/2.1-MB-1-scaled.jpg",
"title": "product name"
}
}
]
}
Update Product Set:
To update product Set on Commerce Platform.
API endpoint- /%catalog-id%/items_batch
Request Type- POST
Sample Curl Request-
Curl Request-
curl --location '{domain}/{catalog-id}/items_batch' \
--header 'Content-Type: application/json' \
--header 'Authorization: {token}
--data '{
"item_type": "PRODUCT_ITEM",
"requests": [
{
"method": "UPDATE",
"data": {
"id": "4",
"price":"10.00 USD",
"availability": "in stock",
"brand": "Nike",
"condition": "new",
"link": "http://www.images.example.com/t-shirts/1.png",
"item_group_id": "product-group-1",
"inventory": "2",
"description": "product description",
"image_link": "https://onlinetestcase.com/wp-content/uploads/2023/06/2.1-MB-1-scaled.jpg",
"title": "product name"
}
}
]
}
Delete Product Set:
To delete product set on Commerce Platform.
API endpoint- /%catalog-id%/items_batch
Request Type- POST
Sample Curl Request-
Curl Request-
curl --location '{domain}/{catalog-id}/items_batch' \
--header 'Content-Type: application/json' \
--header 'Authorization: {token}
--data '{
"item_type": "PRODUCT_ITEM",
"requests": [
{
"method": "DELETE",
"data": {
"id": "4",
"price":"10.00 USD",
"availability": "in stock",
"brand": "Nike",
"condition": "new",
"link": "http://www.images.example.com/t-shirts/1.png",
"item_group_id": "product-group-1",
"inventory": "2",
"description": "product description",
"image_link": "https://onlinetestcase.com/wp-content/uploads/2023/06/2.1-MB-1-scaled.jpg",
"title": "product name"
}
}
]
}
Security Requirements
· APIs should be HTTPS supported with version TLS v1.2
· Customer data should be logically segregated as per user roles defined.
Please refer Meta Documentation for more details: https://developers.facebook.com/docs/marketing-api/reference/product-catalog